<template>
	<view>
		<Header :title="title"></Header>
		<view class="" style="padding: 40rpx;">
			<rich-text class="richText" :nodes="richText"></rich-text>
		</view>
		
	</view>
</template>

<script>
	import Header from '@/components/header/header.vue'
	export default {
		data() {
			return {
				richText: '',
				id: '',
				title: ''
			}
		},
		onLoad(e) {
			this.id = e.id
			this.title = e.title
			console.log(e)
			this.cread()
		},
		components: {
			Header
		},
		methods: {
			async cread() {
				let res = await this.$api.request('manage/information/client/' + this.id)
				let richtext = res.data.content
				this.richText=richtext.replace(/\<h1/gi, '<h1 style="text-indent: 0em;"')
				.replace(/\<h2/gi, '<h2 style="text-indent: 0em;"')
				.replace(/\<img/gi, '<img style="text-indent: 0em;width:100%;height:auto;display:block;"');
			}
		}
	}
</script>

<style lang="scss" scoped>
	
	.richText {
		text-indent: 2em;
		
		



	}
</style>